<% content_for("script") do %>
  <%= javascript_include_tag 'prototype' %>
<% end %>

<h1>Listing questions</h1>

<table>
<tr>
<td>
<div id="question_list">
<% for question in @questions %>
  <div class="question_content">
    <div class="question_question">
      <%= link_to question.question, :controller=>'questions', :action => 'show', :id => question %>
    </div>
    <div class="question_user">
      asked by <%= question.user.login if question.user%>, <%= fuzzytime question%>
    </div>
    <div class="question_tag">
      tags: <%= question.tags.collect{|t| t.name}.join(" ") %>
    </div>
    
  </div>
<% end %>
</div>
</td>
</tr>
</table>

<%= link_to 'Previous page', { :page => @question_pages.current.previous } if @question_pages.current.previous %>
<%= link_to 'Next page', { :page => @question_pages.current.next } if @question_pages.current.next %> 

<br />

<%= link_to 'New question', :controller=> 'questions', :action => 'new' %>

